//
//  FMDBManager.m
//  FMDBDemo
//
//  Created by 赵成峰 on 2016/10/12.
//  Copyright © 2016年 赵成峰youdaoli. All rights reserved.
//

#import "FMDBManager.h"

@interface FMDBManager ()


@end

@implementation FMDBManager

+ (FMDBManager *)sharedManager {
    static dispatch_once_t onceToken;
    static FMDBManager *manager = nil;
    dispatch_once(&onceToken, ^{
        manager = [[FMDBManager alloc] init];
        NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES).firstObject;
        NSString *filePath = [path stringByAppendingPathComponent:@"FMDB.db"];
        manager.database = [FMDatabase databaseWithPath:filePath];
    });
    
    return manager;
}


@end
